<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html 
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SL 
 * All portions are Copyright (C) 2001-2006 Openbravo SL 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->
<HTML>
<HEAD>
<TITLE>Create from.. (massive)</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"></META> 
<SCRIPT language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" type="text/javascript" id="paramLanguage">  LNG_POR_DEFECTO = "en_US";</SCRIPT>
<SCRIPT language="JavaScript" type="text/javascript" id="paramDirection">var baseDirection = "http://openbravo/web/";</SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/String.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/TypeAheadCombo.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" type="text/javascript">
arrTeclas = new Array(
new Teclas("ENTER", "openSearch(null, null, '../info/ProductComplete_FS.html', 'SELECTOR_PRODUCT', true, 'frmMain', 'inpmProductId', 'inpmProductId_DES', document.frmMain.inpmProductId_DES.value, 'Command', 'KEY');", "inpmProductId_DES", "null")
);
activarControlTeclas();

function debugSearch(key, text, keyField) {
  if (keyField=="inpmProductId") {
    calloutSL_CreateFromMultiple_Product(keyField);
  }
return true;
}

function actualizarDatos(combo) {
  cambiarListaCombo(document.frmMain.inpmLocatorX, arrLocator, combo.options[combo.selectedIndex].value, false);
}

function calloutSL_CreateFromMultiple_Warehouse(changedField) {
submitCommandFormParameter('DEFAULT', frmMain.inpLastFieldChanged, changedField, false, null, '../ad_callouts/SL_CreateFromMultiple_Warehouse.html', 'frameOcultoButton');
return true;
}

function calloutSL_CreateFromMultiple_Product(changedField) {
submitCommandFormParameter('DEFAULT', frmMain.inpLastFieldChanged, changedField, false, null, '../ad_callouts/SL_CreateFromMultiple_Product.html', 'frameOcultoButton');
return true;
}

function calloutSL_CreateFromMultiple_Conversion(changedField) {
submitCommandFormParameter('DEFAULT', frmMain.inpLastFieldChanged, changedField, false, null, '../ad_callouts/SL_CreateFromMultiple_Conversion.html', 'frameOcultoButton');
return true;
}

function displayLogic() {
  if (inputValue(document.frmMain.inphasseconduom) == 1) {
    displayLogicElement('paramUOMOrder', true);
  } else {
    displayLogicElement('paramUOMOrder', false);
  }
}

function depurar(action) {
  var frm=document.frmMain;
  if (frm.inpmProductId.value==null || frm.inpmProductId.value=="") {
    frm.inpmProductId_DES.focus();
  mensaje(7);
  return false;
  } else if (frm.inpmovementqty.value==null || frm.inpmovementqty.value=="") {
    frm.inpmovementqty.focus();
  mensaje(7);
  return false;
  } else if (frm.inpnumerolineas.value==null || frm.inpnumerolineas.value=="") {
    frm.inpnumerolineas.focus();
  mensaje(7);
  return false;
  }
  return true;
}

function onloadFunctions() {
  new TypeAheadCombo("reportC_UOM_ID");
  new TypeAheadCombo("inpmProductUomId");
  new TypeAheadCombo("inpmInoutlineTypeId");
  new TypeAheadCombo("reportM_WAREHOUSE_ID");
  new TypeAheadCombo("inpmLocatorX");
}
</SCRIPT>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  onload="focoPrimerControl();onloadFunctions();return true;">
<FORM id="form" method="POST" action="../ad_actionButton/CreateFromMultiple_F1.html" name="frmMain">
  <INPUT type="hidden" name="Command"></INPUT>
  <INPUT type="hidden" name="inpLastFieldChanged"></INPUT>
  <INPUT type="hidden" name="inphasseconduom" value="0"></INPUT>
  <INPUT type="hidden" name="inpmInoutId" value="" id="paramKey"></INPUT>
  <INPUT type="hidden" name="inpWindowId" value="" id="paramWindowId"></INPUT> 
  <INPUT type="hidden" name="inpTabId" value="" id="paramTabId"></INPUT>
  <INPUT type="hidden" name="inpissotrx" value="" id="paramisSOTrx"></INPUT>
  <INPUT type="hidden" name="inpBPartner" value="" id="parambpartner"></INPUT> 
  <TABLE width="45%" cellspacing="0" cellpadding="0" border="1" >
    <TR> 
      <TD  id="processDescription">&nbsp;</TD>
    </TR>
    <TR></TR>
    <TR> 
      <TD id="helpDiscard" > <div  id="processHelp">&nbsp;</div></TD>
    </TR>
  </TABLE>
  <BR></BR>
  <TABLE border="0" cellspacing="0" cellpadding="0">
    <TR> 
      <TD width="127" > <SPAN >Product:</SPAN></TD>
      <TD colspan="3" > <INPUT type="hidden" name="inpmProductId"></INPUT> 
        <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
          <TR> 
            <TD > <INPUT type="text" name="inpmProductId_DES" size="40"></INPUT>
            </TD>
            <TD > <A href="#" onclick="openSearch(null, null, '../info/ProductComplete_FS.html', 'SELECTOR_PRODUCT', true, 'frmMain', 'inpmProductId', 'inpmProductId_DES', document.frmMain.inpmProductId_DES.value,'inpBPartner', document.frmMain.inpBPartner.value);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Search';return true;" > 
              <img width="16" height="16"  alt="Product" title="Product" border="0" src="../../../../../web/images/Product.jpg" id="buttonProduct"></IMG></A></TD>
          </TR>
        </TABLE>
        <INPUT type="hidden" name="inpmProductId_LOC"></INPUT>
        <INPUT type="hidden" name="inpmProductId_ATR"></INPUT>
        <INPUT type="hidden" name="inpmProductId_PQTY"></INPUT>
        <INPUT type="hidden" name="inpmProductId_PUOM"></INPUT>
        <INPUT type="hidden" name="inpmProductId_QTY"></INPUT>
        <INPUT type="hidden" name="inpmProductId_UOM"></INPUT>
        <INPUT type="hidden" name="inpmProductId_PLIST"></INPUT>
        <INPUT type="hidden" name="inpmProductId_PSTD"></INPUT>
        <INPUT type="hidden" name="inpmProductId_PLIM"></INPUT>
        <INPUT type="hidden" name="inpmProductId_CURR"></INPUT>
      </TD>
    </TR>
    <TR> 
      <TD colspan="4">&nbsp;</TD>
    </TR>
    <TR> 
      <TD > <SPAN >Product values</SPAN></TD>
      <TD colspan="3" > <HR></HR>
      </TD>
    </TR>
    <TR> 
      <TD colspan="4">&nbsp;</TD>
    </TR>
    <TR> 
      <TD > <SPAN >Attribute value:</SPAN></TD>
      <TD colspan="3" > <INPUT type="hidden" name="inpmAttributesetinstanceId"></INPUT> 
        <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
          <TR> 
            <TD > <INPUT type="text" size="20"  name="inpmAttributesetinstanceId_D" readonly="true"></INPUT>
            </TD>
            <TD > <A href="#" onclick="openPAttribute(null, null, '../info/AttributeSetInstance_FS.html', null, false, 'frmMain', 'inpmAttributesetinstanceId', 'inpmAttributesetinstanceId_D', document.frmMain.inpmAttributesetinstanceId_D.value, 'WindowID', document.frmMain.inpWindowId.value, 'inpKeyValue', document.frmMain.inpmAttributesetinstanceId.value, 'inpwindowId', document.frmMain.inpWindowId.value, 'inpProduct', document.frmMain.inpmProductId.value);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Search';return true;" > 
            <img  alt="Attribute Set Instance" title="Attribute set instance" width="16" height="16" border="0" src="../../../../../web/images/AttributeSetInstance.jpg"></IMG></A></TD>
          </TR>
        </TABLE></TD>
    </TR>
    <TR> 
      <TD > <SPAN >Quantity:</SPAN></TD>
      <TD > <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
          <TR> 
            <TD > <INPUT type="text" onkeydown="auto_completar_numero(this, true, true);return true;" size="10"  maxlength="10" name="inpmovementqty"></INPUT>
            </TD>
            <TD > <A href="#" onclick="calculator('frmMain.inpmovementqty', document.frmMain.inpmovementqty.value, false);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Show calculator';return true;" > 
              <img  alt="Calculator" title="Calculator" width="16" height="16" border="0" src="../../../../../web/images/Calc.jpg"></IMG></A></TD>
          </TR>
        </TABLE></TD>
      <TD > <SPAN >Unit:</SPAN></TD>
      <TD > <SELECT name="inpcUomId" readonly="true" onchange="selectCombo(this, '');return true;"  id="reportC_UOM_ID">
        </SELECT></TD>
    </TR>
    <TR id="paramUOMOrder" style="display:none;"> 
      <TD > <SPAN >Order Qty</SPAN></TD>
      <TD > <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
          <TR> 
            <TD > <INPUT type="text" onkeydown="auto_completar_numero(this, true, true);return true;" size="10"  maxlength="10" name="inpquantityorder"></INPUT>
            </TD>
            <TD > <A href="#" onclick="calculator('frmMain.inpmovementqty', document.frmMain.inpmovementqty.value, false);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Show calculator';return true;" > 
              <img  alt="Calculator" title="Calculator" width="16" height="16" border="0" src="../../../../../web/images/Calc.jpg"></IMG></A></TD>
          </TR>
        </TABLE></TD>
      <TD > <SPAN >Order unit:</SPAN></TD>
      <TD > <SELECT name="inpmProductUomId" onchange="calloutSL_CreateFromMultiple_Conversion(this.name);" id="inpmProductUomId">
        </SELECT></TD>
    </TR>
    <TR> 
      <TD > <SPAN >Incomming type:</SPAN></TD>
      <TD > <SELECT name="inpmInoutlineTypeId" id="inpmInoutlineTypeId">
          <OPTION value=""></OPTION><DIV id="reportM_INOUTLINETYPE_ID"></DIV>
        </SELECT></TD>
      <TD > <SPAN >Warehouse:</SPAN></TD>
          <td >
        <SELECT name="inpmWarehouseId" id="reportM_WAREHOUSE_ID" onChange="calloutSL_CreateFromMultiple_Warehouse(this.name);return true;">
        </SELECT></TD>
    </TR>
    <TR> 
      <TD colspan="4">&nbsp;</TD>
    </TR>
    <TR> 
      <TD > <SPAN >Location values</SPAN></TD>
      <TD colspan="3" > <HR></HR>
      </TD>
    </TR>
    <TR> 
      <TD colspan="4">&nbsp;</TD>
    </TR>
    <TR> 
    <TD > <SPAN >Corridor</SPAN></TD>
          <td ><SELECT name="inpmLocatorX" class="CampoUpdateable" id="reportM_LOCATOR_X">
        <option value=""></option>
        </SELECT></TD>
                <td ><span >Locator type:&nbsp;</span></td>
          <td ><SELECT name="inpmLocatorType" class="CampoUpdateable">
        <option value=""></option>
        <DIV id="reportM_LOCATOR_TYPE">
                </select></td>
        <td ><span >No. lines:&nbsp;</span></td>
      <TD colspan="3" > <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
          <TR> 
            <TD > <INPUT type="text" onkeydown="auto_completar_numero(this, false, false);return true;" size="10"  maxlength="10" name="inpnumerolineas"></INPUT>
            </TD>
            <TD > <A href="#" onclick="calculator('frmMain.inpnumerolineas', document.frmMain.inpnumerolineas.value, false);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Show calculator';return true;" > 
              <img  alt="Calculator" title="Calculator" width="16" height="16" border="0" src="../../../../../web/images/Calc.jpg"></IMG></A></TD>
          </TR>
        </TABLE></TD>
    </TR>
  </TABLE>
</FORM>
</BODY>
</HTML>
